home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / YICN23.ZIP / SOURCE / VIEW.CPP < prev    next >
C/C++ Source or Header  |  1993-02-14  |  999b  |  36 lines

  1. #include <stdlib.h>
  2. #include <conio.h>
  3. #include "xlib.h"
  4. #include "xtext.h"
  5. #include "xrect.h"
  6. #include "icon.h"
  7. #include "animicon.h"
  8. #include "yakpal.h"
  9. #include <alloc.h>
  10.  
  11. void main(int argCount, char **argVector)
  12. {
  13.   icon myicon;
  14.   unsigned int backpage_offs;
  15.   x_set_mode(2,360);
  16.   x_set_doublebuffer(200);
  17.   x_text_init();
  18.   yakPalette myYakPalette("standard.ypl");
  19.   myYakPalette.put();
  20.   int counter = 1;
  21.   yakLib *myYakLibPtr = NULL;
  22.   if ((argCount > 2) && (argVector[1][0] == '-'))
  23.   {
  24.     myYakLibPtr = new yakLib(&argVector[1][1]);
  25.     counter = 2;
  26.   }
  27.   for (; counter < argCount; ++counter)
  28.   {
  29.     myicon.load(argVector[counter], icon::normal, myYakLibPtr);
  30.     x_bgprintf(0,0, VisiblePageOffs, 0, 15, "Name: %s * Width: %d * Height: %d   ", argVector[counter], myicon.width, myicon.height);
  31.     myicon.show(10, 10, VisiblePageOffs);
  32.     getch();
  33.     x_rect_fill(10,10, 10+myicon.width, 10+myicon.height, VisiblePageOffs, 0);
  34.   }
  35.   x_text_mode();
  36. }